package paywithdrawlogic

import (
	"context"

	"gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/dao/model/withdraw"
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/svc"
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/rpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type UserAuthListPageLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewUserAuthListPageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserAuthListPageLogic {
	return &UserAuthListPageLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *UserAuthListPageLogic) UserAuthListPage(in *rpc.UserAuthListPageReq) (ret *rpc.UserAuthListPageRes, err error) {
	ret = &rpc.UserAuthListPageRes{}
	m := withdraw.NewUserAuthModel(l.ctx, l.svcCtx.Db)
	ret, err = m.UserAuthModelList(in)
	if err != nil {
		return nil, err
	}
	return ret, nil
}
